feat!: adjust linting to new outputs structure#1086
Conversation
… the main `build:` for `run_exports:`
… lint, but probably there's a more elegant solution
… extra argument package_location
…this still throws a linting error
```
FAILED test/test_lint.py::test_lint[should_be_noarch_python-meta-repodata0] - AssertionError: In test 'should_be_noarch_python' on 'meta_package':'skipping_recipe' emitted unexpectedly
assert 'skipping_recipe' in {'should_be_noarch_python'}
+ where 'skipping_recipe' = str(<class 'bioconda_utils.lint.skipping_recipe'>)
+ where <class 'bioconda_utils.lint.skipping_recipe'> = LintMessage(recipe=Recipe "meta_package", check=<class 'bioconda_utils.lint.skipping_recipe'>, severity=<Severity.INFO: 10>, title='skipping linting of this recipe as requested', body='\nAs specified via `extra: skip-recipes:`, this recipe is being\nskipped during linting. This is meant for the linter test\nsuite.', start_line=0, end_line=0, fname='/tmp/pytest-of-dlaehnemann/pytest-122/test_lint_should_be_noarch_pyt2/recipes/meta_package/meta.yaml', canfix=False).check
```
… multiple outputs: are specified, also add linting test case for this
…ction type in a recipe
epruesse
left a comment
There was a problem hiding this comment.
original PR already approved
|
@dlaehnemann The PRs will be squashed into one commit to the main branch anyway. If you think this should stay as multiple pieces, you'd have to do separate PRs or we'd have to somehow to the merge manually. Also, I'm not sure about the classification as "fix". It might be a "feat!" (new feature with breaking change requiring major version bump). Thoughts? |
|
Basically, this has grown in scope since Johannes approved the original PR. and I did the overhaul of the linting test suite, which has been merged. So I cherry-picked all the relevant stuff here, so that we would have a clean diff in the pull request, mainly for the review of this pull request. But this is not yet done. I'm still working through all the cases with the new |
…sing_inherited_section() and include respective outputs: test cases
…vel source section
…ection path as a key for each result entry
…ses for multiple outputs, include previously missing extra_skip_lints_not_list linting test case
…with underscore in the function arguments
…ettings() return dict
|
OK, I think this is good to be reviewed and possibly merged. This is another step towards proper linting of recipes with multiple outputs, also working towards supporting the new However, I have restricted it to linting the stuff that the existing multi-output recipes in bioconda require. This means that the linting currently does not check all of the inheritance behavior of the Finally, the failing And I don't understand why the @bioconda/core , anybody up for a review? |
ty is not smart enough here, but the code is also quite old-fashioned I would say. Here is a PR that fixes this issue by using a dataclass instead: #1114 |
…per-output build numbers would not be respected
This pull request is basically
git cherry-pickingall the previous work in pull request #1073 , as that one's diff has gotten too confusing with a failedrebase --onto masterattempt (I realized too late, that I am working on a fork, here...). In addition, this pull request is a bit more generic, trying to get a consistent linting and comprehensive linting tests for recipes with multiple outputs in general. The aim is to work towards supporting the newrattler-builddrivenrecipe.yamlformat that has been accepted as Conda Enhancement Proposals (CEPs) 13 and 14, by implementing theoutputs:specification in the linting over here.So, this is a fresh start after the overhaul of the linting test suite setup in #1085 has been merged. And to also link more previous work, this is the follow-up to pull request #1057, which did a first step towards better linting of multiple outputs.
Please note, that this will require updating all of the 7 recipes with multiple outputs so that they pass the new lints, also see here:
#1057 (comment)
The plan is to open a separate pull request for each of them on
bioconda-recipes.